// user_mfc.h : main header file for the PROJECT_NAME application
//

#pragma once

#ifndef __AFXWIN_H__
	#error "include 'stdafx.h' before including this file for PCH"
#endif

#include "resource.h"		// main symbols


// Cuser_mfcApp:
// See user_mfc.cpp for the implementation of this class
//

class Cuser_mfcApp : public CWinApp
	,public CNotifyCommandImpl
{
public:
	Cuser_mfcApp();
	CComQIPtr<IArtApp>			m_pArtApp;
	CComQIPtr<IArtMainFrame>	m_pMainFrame;

// Overrides
	public:
	virtual BOOL InitInstance();
	HRESULT CreateMainFrame();
	HRESULT CreateSplitterWnd();
	void CreateTools();

	void OnFileNew(UINT nCmdID, ICommandItem *pCmdUI);
	void OnAppExit(UINT nCmdID, ICommandItem *pCmdUI);
	void OnHelp(UINT nCmdID, ICommandItem *pCmdUI);
	void OnCloseFile(UINT nCmdID, ICommandItem *pCmdUI);

	BEGIN_NC_MAP()		
		NC_COMMAND_ID_CMDUI(ID_FILE_NEW, OnFileNew)
		NC_COMMAND_ID_CMDUI(ID_FILE_CLOSEFILE, OnCloseFile)
		NC_COMMAND_ID_CMDUI(ID_FILE_EXIT, OnAppExit)
		NC_COMMAND_ID_CMDUI(ID_HELP_HELP, OnHelp)
	END_NC_MAP()

	void OnQueryFileNew(ICommandItem *pCmdUI);
	void OnQueryCloseFile(ICommandItem *pCmdUI);
	void OnQueryAppExit(ICommandItem *pCmdUI);
	void OnQueryHelp(ICommandItem *pCmdUI);
	BEGIN_QUERY_STATE_MAP()
		QUERY_STATE_UI(ID_FILE_NEW, OnQueryFileNew)
		QUERY_STATE_UI(ID_FILE_CLOSEFILE, OnQueryCloseFile)
		QUERY_STATE_UI(ID_FILE_EXIT, OnQueryAppExit)
		QUERY_STATE_UI(ID_HELP_HELP, OnQueryHelp)
	END_QUERY_STATE_MAP()


// Implementations

	DECLARE_MESSAGE_MAP()
};

extern Cuser_mfcApp theApp;